export const transform = <T>(data: any, trans: (item: any) => T): T[] | undefined => {
    if (!data) return undefined
    return Object.keys(data).map(key => trans(data[key]))
}